package ua.lviv.franko.mlsFunctions.oneDimension;

public class Particle {
	protected double	xi;
	protected double	rho;

	public Particle() {
		xi = 0.0;
		rho = 0.0;
	}

	public Particle(double xi, double rho) {
		this.xi = xi;
		this.rho = rho;
	}

	public double getRho() {
		return rho;
	}

	public double getXi() {
		return xi;
	}

	public double lengthTo(Particle p) {
		return Math.abs((p.xi - xi));
	}

	public void setRho(double rho) {
		this.rho = rho;
	}

	public void setXi(double xi) {
		this.xi = xi;
	}

	@Override
	public String toString() {
		return xi + "\t" + rho;
	}

}
